//
//  HMDoctorIntroCell.m
//  HMPersonalDoctor
//
//  Created by GD on 16/9/11.
//  Copyright © 2016年 geduo. All rights reserved.
//

#import "HMDoctorIntroCell.h"
#import "UIImageView+WebCache.h"

@interface HMDoctorIntroCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *exp_nameLabel;

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UILabel *hospitalLabel;

@property (weak, nonatomic) IBOutlet UILabel *departLabel;

@property (weak, nonatomic) IBOutlet UILabel *goodAtLabel;

@end

@implementation HMDoctorIntroCell

+(instancetype)doctorIntroCell{
    return [[NSBundle mainBundle] loadNibNamed:@"HMDoctorIntroCell" owner:nil options:nil].lastObject;
}

-(void)setModel:(HMDoctorIntroModel *)model{

    _model = model;
    
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.docimage]];
    
    self.exp_nameLabel.text = model.exp_name;
    
    self.titleLabel.text = model.title;
    
    self.hospitalLabel.text = model.hospital;
    
    self.departLabel.text = model.depart;
    
    self.goodAtLabel.text = model.goodat;


}

- (IBAction)zixun:(id)sender {
    
    [self.delegate doctorIntroCell:self didClickZiXun:self.model.zixun];
}


- (IBAction)zhuanzhen:(id)sender {
    
    [self.delegate doctorIntroCell:self didClickZhuanZhen:self.model.xianqi];
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
//    self.layer.cornerRadius = 5;
//    self.clipsToBounds = YES;
    self.iconView.layer.cornerRadius = 5;
    self.iconView.clipsToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
